<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/html/MyTag.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="html/Style/skin.css" />
    
<script type="text/javascript" src="html/Js/jquery-1.9.1.min.js"></script></head>
    <script type="text/javascript">
    	
    	$(function(){
		$('#bt1').on('click',function(){
			$('input[name=checkbox]').prop('checked',true);
			});
			
		$('#bt2').on('click',function(){
			$('input[name=checkbox]').each(function(index, element) {
				if($(this).prop('checked')){
					$(this).prop('checked',false);		
				}else {
					$(this).prop('checked',true);
				}
            	});
			});	
			
	});
    	
    </script>	    
    <body>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!-- 头部开始 -->
            <tr>
                <td width="17" valign="top" background="html/Images/mail_left_bg.gif">
                    <img src="html/Images/left_top_right.gif" width="17" height="29" />
                </td>
                <td valign="top" background="html/Images/content_bg.gif">
                    <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" background="html/Images/content_bg.gif">
                        <tr><td height="31"><div class="title">销售计划</div></td></tr>
                    </table>
                </td>
                <td width="16" valign="top" background="html/Images/mail_right_bg.gif"><img src="html/Images/nav_right_bg.gif" width="16" height="29" /></td>
            </tr>
            <!-- 中间部分开始 -->
            <tr>
                <!--第一行左边框-->
                <td valign="middle" background="html/Images/mail_left_bg.gif">&nbsp;</td>
                <!--第一行中间内容-->
                <td valign="top" bgcolor="#F7F8F9">
                    <table style="width:100%" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <!-- 空白行-->
                        <tr><td colspan="2" valign="top">&nbsp;</td><td>&nbsp;</td><td valign="top">&nbsp;</td></tr>
						<tr>
							<td colspan="4">
								<form class="clearfix">
									<div style="float:left">
										<p style="float:left; margin-left:30px;"><label>月份：</label><input class="text" style="width:80px;"/></p>&nbsp;&nbsp;&nbsp;
										<p style="float:left; margin-left:30px;"><input type="button" class="btn" value="查询"/></p>
									</div>
									<div style="float:right">
										<input type="button" onclick='window.location="add.html"' class="btn" value="制定计划"/> 
										<input type="button" class="btn" value="批量删除"/>	
									</div>
								</form>
							<td>
						</tr>
                        <!-- 一条线 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 列表展示开始 -->
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="96%">
                                <table width="100%">
                                    <tr>
                                        <td colspan="2">
                                            <form action="market.do?method=list" method="post">
                                                <table width="100%"  class="cont tr_color">
                                                    <tr>
                                                        <th>序号</th>
                                                        <th>选择</th>
                                                        <th>计划制定人</th>
                                                        <th>目标时间</th>
                                                        <th>最后操作时间</th>
                                                        <th>操作人</th>
                                                        
														<th>待处理人</th>
                                                        <th>状态</th>
                                                        <th>操作</th>
                                                    </tr>
                                                   <c:forEach items="${market }" var="market">
                                                    <tr align="center" class="d">
                                                   		<td>${market.marketId }</td>
                                                        <td><input type="checkbox" value="" name="checkbox"/></td>
                                                        <td>${market.empId.name }</td>
                                                        <td><a href="market.do?method=findById&id=${market.marketId }">${market.finishDate }</a></td>
                                                        <td>${market.lastDate }</td>
                                                        <td>${market.operId.name }</td>
                                                       
														<td>周翔宇</td>
                                                        <td>
                                                        	<c:if test="${market.marketStatus==0 }">未提交</c:if>
                                                        	<c:if test="${market.marketStatus==1 }">待审核</c:if>
                                                        	<c:if test="${market.marketStatus==2 }">未通过</c:if>
                                                        	<c:if test="${market.marketStatus==3 }">已通过</c:if>
                                                        </td>
                                                        <td>
															<a href="#">提交</a>&nbsp;&nbsp;
                                                        	<a href="market.do?method=findById2&id=${market.marketId }">修改</a>&nbsp;&nbsp;
                                                            <a href="#">删除</a>&nbsp;&nbsp;
                                                            <a href="market.do?method=findById&id=${market.marketId }">详情</a>
														</td>
                                                    </tr>
                                                  </c:forEach>
                                                </table>
                                            </form>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="2%">&nbsp;</td>
                        </tr>
                        <!--列表展示结束 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="51%" class="left_txt">
                           		<input type="button"  id="bt1" value="全选" />&nbsp;&nbsp;&nbsp;
                                <input type="button" id="bt2" value="反选" />
								<!--
								<a href="list_manager.html">销售经理</a>&nbsp;&nbsp;&nbsp;
								<a href="list_director.html">销售总监</a>
								-->
                            	<div style="float:right;">
									<b>
									<page:pagePrint url="market.do" key="nowPage" pageUtil="${page }"/>
									</b>
								</div>
                            </td>
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>
                    </table>
                </td>
                <td background="html/Images/mail_right_bg.gif">&nbsp;</td>
            </tr>
            <!-- 底部部分 -->
            <tr>
                <td valign="bottom" background="html/Images/mail_left_bg.gif">
                    <img src="html/Images/buttom_left.gif" width="17" height="17" />
                </td>
                <td background="html/Images/buttom_bgs.gif">
                    <img src="html/Images/buttom_bgs.gif" width="17" height="17">
                </td>
                <td valign="bottom" background="html/Images/mail_right_bg.gif">
                    <img src="html/Images/buttom_right.gif" width="16" height="17" />
                </td>           
            </tr>
        </table>
    </body>
</html>